package com.ruoyi.grids.service.impl;

import com.ruoyi.grids.domain.CabinetGrids;
import com.ruoyi.grids.mapper.CabinetGridsMapper;
import com.ruoyi.grids.service.ICabinetGridsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 柜格状态Service业务层处理
 *
 * @author ruoyi
 * @date 2025-06-03
 */
@Service
public class CabinetGridsServiceImpl implements ICabinetGridsService
{
    @Autowired
    private CabinetGridsMapper cabinetGridsMapper;

    /**
     * 查询柜格状态
     *
     * @param gridId 柜格状态主键
     * @return 柜格状态
     */
    @Override
    public CabinetGrids selectCabinetGridsByGridId(Long gridId)
    {
        return cabinetGridsMapper.selectCabinetGridsByGridId(gridId);
    }

    /**
     * 查询柜格状态列表
     *
     * @param cabinetGrids 柜格状态
     * @return 柜格状态
     */
    @Override
    public List<CabinetGrids> selectCabinetGridsList(CabinetGrids cabinetGrids)
    {
        return cabinetGridsMapper.selectCabinetGridsList(cabinetGrids);
    }

    /**
     * 新增柜格状态
     *
     * @param cabinetGrids 柜格状态
     * @return 结果
     */
    @Override
    public int insertCabinetGrids(CabinetGrids cabinetGrids)
    {
        return cabinetGridsMapper.insertCabinetGrids(cabinetGrids);
    }

    /**
     * 修改柜格状态
     *
     * @param cabinetGrids 柜格状态
     * @return 结果
     */
    @Override
    public int updateCabinetGrids(CabinetGrids cabinetGrids)
    {
        return cabinetGridsMapper.updateCabinetGrids(cabinetGrids);
    }

    /**
     * 批量删除柜格状态
     *
     * @param gridIds 需要删除的柜格状态主键
     * @return 结果
     */
    @Override
    public int deleteCabinetGridsByGridIds(Long[] gridIds)
    {
        return cabinetGridsMapper.deleteCabinetGridsByGridIds(gridIds);
    }

    /**
     * 删除柜格状态信息
     *
     * @param gridId 柜格状态主键
     * @return 结果
     */
    @Override
    public int deleteCabinetGridsByGridId(Long gridId)
    {
        return cabinetGridsMapper.deleteCabinetGridsByGridId(gridId);
    }
}
